<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script>
window.onload = function()
{
	var otxt1 = document.getElementById('txt1');
	var otxt2 = document.getElementById('txt2');
	var obtn = document.getElementById('btn1');
	
	obtn.onclick = function(){
		var re = /奥运会|国际|奥林匹克运动会/g;
		
		otxt2.value = otxt1.value.replace(re, '????')
	};
};
</script>
</head>

<body>
<textarea name="" id="txt1" cols="30" rows="10"></textarea> <br>
<input type="button" id="btn1" value="转换"><br>
<textarea name="" id="txt2" cols="30" rows="10"></textarea>
</body>
</html>
